<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
    if (80 == request.getServerPort())
    {
        basePath = request.getScheme() + "://"
                + request.getServerName() + path + "/";
    }
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("Expires", 0);
    response.setHeader("Cache-Control",
            "no-store,no-cache,must-revalidate");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">

		<title>用户信息管理</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script type="text/javascript"
			src='<%=request.getContextPath()%>/js/js.js'></script>
		<script type="text/javascript"
			src='<%=request.getContextPath()%>/js/jquery-1.7.1.js'></script>
	</head>

	<body>
	<div>
		<jsp:include page="./head.jsp"></jsp:include>
		<jsp:include page="./list.jsp"></jsp:include>
		<div class="bodycontent">
			<div class="contenthead"><label>搜索用户：</label>
				<input type="text" placeholder="输入用户名称进行搜索" id="key" class="basic_input" value="<s:if test="#request.keyresulQuest != null && #request.keyresulQuest != ''"><s:property value="#request.keyresulUser"/></s:if>"/>
				<input type="button" onclick="searchUserByName();" value="搜索"/>
				<input type="button" onclick="addUserJsp();" value="添加用户"/>
			</div>
			<div>
				<table width="100%">
					<tr class="oddeven_0 textaligncenter"><td>编号</td><td>姓名</td><td>分数</td><td>管理</td></tr>
					<s:iterator id="user" value="userList" status="statusUserList">
						<tr class="oddeven_<s:property value="#statusUserList.count % 2"/>">
							<td class="textaligncenter" style="width:50px;"><s:property value="#user.u_id"/></td>
							<td class="textaligncenter" style="width:400px;"><s:property value="#user.u_name"/></td>
							<td class="textaligncenter">
								<s:if test="#user.u_grade == -1">
									<s:property value="#user.u_grade_str" />
								</s:if>
								<s:else>
									<s:property value="#user.u_grade" />
								</s:else>
							</td>
							<td class="textaligncenter" style="width:200px;">
								<input type="button" onclick="updateInfo(<s:property value="#user.u_id"/>);" value="修改信息"/>
								<input type="button" onclick="deleteInfo(<s:property value="#user.u_id"/>);" value="删除该信息"/>
							</td>
						</tr>
					</s:iterator>
					<tr><td colspan="4"><jsp:include page="./pagetag.jsp"></jsp:include></td></tr>
				</table>
			</div>
		</div>
	</div>
	</body>
</html>
